<template>
  <div>
    <h2>App</h2>
    <button @click="oneCountAdd">控制One的组件的内部的OneCount累加</button>
    <One />
    <Two />
  </div>
</template>

<script>
  import Two from "@/components/Two";
  import One from "@/components/One";
  export default {
    name: "App",
    data() {
      return {};
    },
    components: {
      One,
      Two,
    },
    methods: {
      oneCountAdd() {
        console.log(this.$children);
        console.log(this.$children[0]);
        this.$children[0].oneCount++;
      },
    },
  };
</script>

<style></style>
